package problem.array;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

public class problem39 {
	public static void main(String[] args) {
		
	}
	  public static List<List<Integer>> combinationSum(int[] candidates, int target) {
	      int start = 1;
	      List<List<List<Integer>>> result = new LinkedList<>();
	      
	      List<List<Integer>> list0 = new LinkedList<>();
	      result.add(list0);
	      Arrays.sort(candidates);
	      while(start <= target){
	    	List<List<Integer>> list = buildPath(candidates, start, result);
	    	  
	      }
		  return null;
	    }
	  public static List<List<Integer>> buildPath(int [] candidates,int target,
			  List<List<List<Integer>>> result){
		  
		  
		  List<List<Integer>> allPath = new LinkedList<>();
		  if(target == 1){
			  if(candidates[0] == 1){
				  List<Integer> list = new LinkedList<>();
				  list.add(1);
				  allPath.add(list);
				  return allPath;
			  }
		  }
		   
		  
		  return null;
	  }
}
